/**
 * 获取地址栏参数
 * @param {String} url  ('https://www.baidu.com/s?tn=68018901_2_oem_dg&ie=utf-8&wd=fdas)
 * @returns {Object}    ({tn: '68018901_2_oem_dg', ie: 'utf-8', wd: 'fdas'})
 */
 function getParams(url)
 {
     let param = decodeURI(url.split('?')[1])   //解码，分割域名和参数
     if(param.length < 1) return '无参数'
     if(param ==='undefined') return '无参数'
 
     let vars = param.split('&')
     let params = {}
     vars.forEach(item=>{
         let temp = item.split('=')
         params[temp[0]] = temp[1]
     })
     return params
 }